import {
	http
} from '../httpIndex.js'


export default {
	// 修改密码
	resetPwd(data) {
		return http.put(
			`app/user/resetPwd`, data
		)
	},

	//
	todoListCount(id) {
		return http.get(
			`app/dutyHandle/find/todoListCount/${id}`
		)
	},
	// logout() {
	// 	return http.post(
	// 		`app/User/logout`
	// 	)
	// },

	logout(data) {
		return http.post(
			`app/User/logout`, data
		)
	},
	logoutByStudent(data) {
		return http.post(
			`app/User/logoutByStudent`, data
		)
	},
	saveOpenId(data) {
		return http.post(
			`app/weChat/saveOpenId`, data
		)
	},
	getOpenID(data){
		return http.post("app/weChat/getOpenID", data)
	},
	getPhone(data){
			return http.post("app/weChat/getPhone", data)
	},
	doSystemLogin(data){
		return http.post("app/User/doLogin", data)
	},
	
	loginByOpenId(loginCode) {
		return http.get(`app/User/loginByOpenId?loginCode=${loginCode}`)
	},
	
	loginByPhone(loginCode,phoneCode) {
		return http.get(`app/User/loginByPhone?loginCode=${loginCode}&phoneCode=${phoneCode}`)
	},
	
	getUserInfoById(loginId) {
		return http.get(`app/User/getUserInfoById?loginId=${loginId}`)
	},
}